import java.util.HashMap;

// by Sacha Best and Brian Bagdasarian

public class StockExchange
{
	private HashMap<String, Stock> stocks;
	
	public StockExchange()
	{
		this.stocks = new HashMap<String, Stock>();
	}
	
	public void listStock(String symbol, String name, double price)
	{
		stocks.put(symbol, new Stock(symbol, name, price));
	}
	public String getQuote(String symbol)
	{
		return stocks.get(symbol).getQuote();
	}
	public void placeOrder(TradeOrder order)
	{
		Stock ordered = stocks.get(order.getSymbol());
		ordered.placeOrder(order);
	}
}
